function [d2C1xy,d2C21xy,d2C22xy] = d2Cxy(m0,m1,m11,m2,m22,m12,dm0x,dm1x,dm11x,dm2x,dm22x,dm12x,dm0y,dm1y,dm11y,dm2y,dm22y,dm12y,d2m0xy,d2m1xy,d2m11xy,d2m2xy,d2m22xy,d2m12xy)
d2C1xy=(m11*d2m22xy - 2*m12*d2m12xy + m22*d2m11xy - 2*dm12x*dm12y + dm11x*dm22y + dm22x*dm11y)/(m0*(m11*m22 - m12^2) -...
    m2^2*m11 - m1^2*m22 + 2*m1*m2*m12) - ((dm11y*m22 - 2*dm12y*m12 + dm22y*m11)*(m0*(dm11x*m22 - 2*dm12x*m12 +...
    dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 + 2*dm1x*m2*m12 + 2*dm2x*m1*m12 - 2*dm2x*m2*m11 +...
    2*dm12x*m1*m2 - 2*dm1x*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 - ((dm11x*m22 -...
    2*dm12x*m12 + dm22x*m11)*(m0*(dm11y*m22 - 2*dm12y*m12 + dm22y*m11) + dm0y*(m11*m22 - m12^2) - dm11y*m2^2 -...
    dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 + 2*dm12y*m1*m2 - 2*dm1y*m1*m22))/(- m22*m1^2 +...
    2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 - ((m11*m22 - m12^2)*(2*dm1x*dm2y*m12 - m2^2*d2m11xy -...
    m1^2*d2m22xy - m12^2*d2m0xy + 2*dm1x*dm12y*m2 + 2*dm2x*dm1y*m12 - 2*dm2x*dm2y*m11 - 2*dm2x*dm11y*m2 +...
    2*dm2x*dm12y*m1 - 2*dm11x*dm2y*m2 + 2*dm12x*dm1y*m2 + 2*dm12x*dm2y*m1 - 2*dm0x*dm12y*m12 - 2*dm1x*dm1y*m22 -...
    2*dm1x*dm22y*m1 - 2*dm12x*dm0y*m12 - 2*dm12x*dm12y*m0 - 2*dm22x*dm1y*m1 + dm0x*dm11y*m22 + dm0x*dm22y*m11 +...
    dm11x*dm0y*m22 + dm11x*dm22y*m0 + dm22x*dm0y*m11 + dm22x*dm11y*m0 + 2*m1*m2*d2m12xy + 2*m1*m12*d2m2xy -...
    2*m2*m11*d2m2xy + 2*m2*m12*d2m1xy - 2*m0*m12*d2m12xy - 2*m1*m22*d2m1xy + m0*m11*d2m22xy + m0*m22*d2m11xy +...
    m11*m22*d2m0xy))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 + (2*(m11*m22 - m12^2)*...
    (m0*(dm11x*m22 - 2*dm12x*m12 + dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 + 2*dm1x*m2*m12 +...
    2*dm2x*m1*m12 - 2*dm2x*m2*m11 + 2*dm12x*m1*m2 - 2*dm1x*m1*m22)*(m0*(dm11y*m22 - 2*dm12y*m12 + dm22y*m11) +...
    dm0y*(m11*m22 - m12^2) - dm11y*m2^2 - dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 + 2*dm12y*m1*m2 -...
    2*dm1y*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^3;
d2C21xy=(m2*d2m12xy + m12*d2m2xy - m1*d2m22xy - m22*d2m1xy + dm2x*dm12y + dm12x*dm2y - dm1x*dm22y - dm22x*dm1y)/...
    (m0*m12^2 + m2^2*m11 + m1^2*m22 - 2*m1*m2*m12 - m0*m11*m22) + ((dm2y*m12 + dm12y*m2 - dm1y*m22 - dm22y*m1)*(m0*...
    (dm11x*m22 - 2*dm12x*m12 + dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 + 2*dm1x*m2*m12 +...
    2*dm2x*m1*m12 - 2*dm2x*m2*m11 + 2*dm12x*m1*m2 - 2*dm1x*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 +...
    m0*(m11*m22 - m12^2))^2 + ((dm2x*m12 + dm12x*m2 - dm1x*m22 - dm22x*m1)*(m0*(dm11y*m22 - 2*dm12y*m12 + dm22y*m11) +...
    dm0y*(m11*m22 - m12^2) - dm11y*m2^2 - dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 + 2*dm12y*m1*m2 -...
    2*dm1y*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 + ((m2*m12 - m1*m22)*...
    (2*dm1x*dm2y*m12 - m2^2*d2m11xy - m1^2*d2m22xy - m12^2*d2m0xy + 2*dm1x*dm12y*m2 + 2*dm2x*dm1y*m12 -...
    2*dm2x*dm2y*m11 - 2*dm2x*dm11y*m2 + 2*dm2x*dm12y*m1 - 2*dm11x*dm2y*m2 + 2*dm12x*dm1y*m2 + 2*dm12x*dm2y*m1 -...
    2*dm0x*dm12y*m12 - 2*dm1x*dm1y*m22 - 2*dm1x*dm22y*m1 - 2*dm12x*dm0y*m12 - 2*dm12x*dm12y*m0 - 2*dm22x*dm1y*m1 +...
    dm0x*dm11y*m22 + dm0x*dm22y*m11 + dm11x*dm0y*m22 + dm11x*dm22y*m0 + dm22x*dm0y*m11 + dm22x*dm11y*m0 +...
    2*m1*m2*d2m12xy + 2*m1*m12*d2m2xy - 2*m2*m11*d2m2xy + 2*m2*m12*d2m1xy - 2*m0*m12*d2m12xy - 2*m1*m22*d2m1xy +...
    m0*m11*d2m22xy + m0*m22*d2m11xy + m11*m22*d2m0xy))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 -...
    (2*(m2*m12 - m1*m22)*(m0*(dm11x*m22 - 2*dm12x*m12 + dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 +...
    2*dm1x*m2*m12 + 2*dm2x*m1*m12 - 2*dm2x*m2*m11 + 2*dm12x*m1*m2 - 2*dm1x*m1*m22)*(m0*(dm11y*m22 - 2*dm12y*m12 +...
    dm22y*m11) + dm0y*(m11*m22 - m12^2) - dm11y*m2^2 - dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 +...
    2*dm12y*m1*m2 - 2*dm1y*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^3;
d2C22xy=(m1*d2m12xy - m2*d2m11xy - m11*d2m2xy + m12*d2m1xy + dm1x*dm12y - dm2x*dm11y - dm11x*dm2y + dm12x*dm1y)/...
    (m0*m12^2 + m2^2*m11 + m1^2*m22 - 2*m1*m2*m12 - m0*m11*m22) + ((dm1y*m12 - dm2y*m11 - dm11y*m2 + dm12y*m1)*...
    (m0*(dm11x*m22 - 2*dm12x*m12 + dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 + 2*dm1x*m2*m12 +...
    2*dm2x*m1*m12 - 2*dm2x*m2*m11 + 2*dm12x*m1*m2 - 2*dm1x*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 +...
    m0*(m11*m22 - m12^2))^2 + ((dm1x*m12 - dm2x*m11 - dm11x*m2 + dm12x*m1)*(m0*(dm11y*m22 - 2*dm12y*m12 + dm22y*m11) +...
    dm0y*(m11*m22 - m12^2) - dm11y*m2^2 - dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 + 2*dm12y*m1*m2 -...
    2*dm1y*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 + ((m1*m12 - m2*m11)*...
    (2*dm1x*dm2y*m12 - m2^2*d2m11xy - m1^2*d2m22xy - m12^2*d2m0xy + 2*dm1x*dm12y*m2 + 2*dm2x*dm1y*m12 -...
    2*dm2x*dm2y*m11 - 2*dm2x*dm11y*m2 + 2*dm2x*dm12y*m1 - 2*dm11x*dm2y*m2 + 2*dm12x*dm1y*m2 + 2*dm12x*dm2y*m1 -...
    2*dm0x*dm12y*m12 - 2*dm1x*dm1y*m22 - 2*dm1x*dm22y*m1 - 2*dm12x*dm0y*m12 - 2*dm12x*dm12y*m0 - 2*dm22x*dm1y*m1 +...
    dm0x*dm11y*m22 + dm0x*dm22y*m11 + dm11x*dm0y*m22 + dm11x*dm22y*m0 + dm22x*dm0y*m11 + dm22x*dm11y*m0 +...
    2*m1*m2*d2m12xy + 2*m1*m12*d2m2xy - 2*m2*m11*d2m2xy + 2*m2*m12*d2m1xy - 2*m0*m12*d2m12xy - 2*m1*m22*d2m1xy +...
    m0*m11*d2m22xy + m0*m22*d2m11xy + m11*m22*d2m0xy))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^2 -...
    (2*(m1*m12 - m2*m11)*(m0*(dm11x*m22 - 2*dm12x*m12 + dm22x*m11) + dm0x*(m11*m22 - m12^2) - dm11x*m2^2 - dm22x*m1^2 +...
    2*dm1x*m2*m12 + 2*dm2x*m1*m12 - 2*dm2x*m2*m11 + 2*dm12x*m1*m2 - 2*dm1x*m1*m22)*(m0*(dm11y*m22 - 2*dm12y*m12 +...
    dm22y*m11) + dm0y*(m11*m22 - m12^2) - dm11y*m2^2 - dm22y*m1^2 + 2*dm1y*m2*m12 + 2*dm2y*m1*m12 - 2*dm2y*m2*m11 +...
    2*dm12y*m1*m2 - 2*dm1y*m1*m22))/(- m22*m1^2 + 2*m12*m1*m2 - m11*m2^2 + m0*(m11*m22 - m12^2))^3;
end

